package com.lims.landInfo.model;

import javax.persistence.*;

import org.hibernate.annotations.GenericGenerator;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import javacommon.base.*;

import cn.org.rapid_framework.util.*;

/**
 * @author zzh
 * @version 1.0
 * @since 1.0
 */@Entity
@Table(name = "LIMS_Collective")
public class Collective extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//date formats
	public static final String FORMAT_LAND_DATE = DATE_FORMAT;
	public static final String FORMAT_CREATE_DATE = DATE_FORMAT;
	

	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * ID       db_column: OBJID 
     */ 	
	private java.lang.String objid;
    /**
     * 序号       db_column: sno 
     */ 	
	private java.lang.Integer sno;
    /**
     * 宗地编号       db_column: landno 
     */ 	
	private java.lang.String landno;
    /**
     * 用地企业名称       db_column: corpName 
     */ 	
	private java.lang.String corpName;
    /**
     * 集体土地位置       db_column: address 
     */ 	
	private java.lang.String address;
    /**
     * 土地产权单位名称       db_column: landOwner 
     */ 	
	private java.lang.String landOwner;
    /**
     * 商业       db_column: business 
     */ 	
	private java.lang.Double business;
    /**
     * 居住       db_column: live 
     */ 	
	private java.lang.Double live;
    /**
     * 工业       db_column: industry 
     */ 	
	private java.lang.Double industry;
    /**
     * 综合       db_column: composite 
     */ 	
	private java.lang.Double composite;
    /**
     * 剩余租赁期限(年)       db_column: remainingTerm 
     */ 	
	private java.lang.Integer remainingTerm;
    /**
     * 建筑面积(平方米)       db_column: area 
     */ 	
	private java.lang.Double area;
    /**
     * 是否涉讼       db_column: isComplaint 
     */ 	
	private java.lang.Integer isComplaint;
    /**
     * 变化类型       db_column: changeType 
     */ 	
	private java.lang.Integer changeType;
    /**
     * 调整列的列号       db_column: oldno 
     */ 	
	private java.lang.String oldno;
    /**
     * 调整前的内容       db_column: oldContent 
     */ 	
	private java.lang.String oldContent;
    /**
     * 备注       db_column: describe 
     */ 	
	private java.lang.String describe;
    /**
     * 日期       db_column: landDate 
     */ 	
	private java.util.Date landDate;
    /**
     * 创建日期       db_column: createDate 
     */ 	
	private java.util.Date createDate;
	//columns END


	public Collective(){
	}

	public Collective(
		java.lang.String objid
	){
		this.objid = objid;
	}

	

	public void setObjid(java.lang.String value) {
		this.objid = value;
	}
	
	@Id @GeneratedValue(generator="custom-id")
	@GenericGenerator(name="custom-id", strategy = "uuid")
	@Column(name = "OBJID", nullable = false, insertable = true, updatable = true, length = 32)
	public java.lang.String getObjid() {
		return this.objid;
	}
	
	@Column(name = "sno", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getSno() {
		return this.sno;
	}
	
	public void setSno(java.lang.Integer value) {
		this.sno = value;
	}
	
	@Column(name = "landno", unique = false, nullable = true, insertable = true, updatable = true, length = 20)
	public java.lang.String getLandno() {
		return this.landno;
	}
	
	public void setLandno(java.lang.String value) {
		this.landno = value;
	}
	
	@Column(name = "corpName", unique = false, nullable = true, insertable = true, updatable = true, length = 50)
	public java.lang.String getCorpName() {
		return this.corpName;
	}
	
	public void setCorpName(java.lang.String value) {
		this.corpName = value;
	}
	
	@Column(name = "address", unique = false, nullable = true, insertable = true, updatable = true, length = 50)
	public java.lang.String getAddress() {
		return this.address;
	}
	
	public void setAddress(java.lang.String value) {
		this.address = value;
	}
	
	@Column(name = "landOwner", unique = false, nullable = true, insertable = true, updatable = true, length = 150)
	public java.lang.String getLandOwner() {
		return this.landOwner;
	}
	
	public void setLandOwner(java.lang.String value) {
		this.landOwner = value;
	}
	
	@Column(name = "business", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public java.lang.Double getBusiness() {
		return this.business;
	}
	
	public void setBusiness(java.lang.Double value) {
		this.business = value;
	}
	
	@Column(name = "live", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public java.lang.Double getLive() {
		return this.live;
	}
	
	public void setLive(java.lang.Double value) {
		this.live = value;
	}
	
	@Column(name = "industry", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public java.lang.Double getIndustry() {
		return this.industry;
	}
	
	public void setIndustry(java.lang.Double value) {
		this.industry = value;
	}
	
	@Column(name = "composite", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public java.lang.Double getComposite() {
		return this.composite;
	}
	
	public void setComposite(java.lang.Double value) {
		this.composite = value;
	}
	
	@Column(name = "remainingTerm", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getRemainingTerm() {
		return this.remainingTerm;
	}
	
	public void setRemainingTerm(java.lang.Integer value) {
		this.remainingTerm = value;
	}
	
	@Column(name = "area", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public java.lang.Double getArea() {
		return this.area;
	}
	
	public void setArea(java.lang.Double value) {
		this.area = value;
	}
	
	@Column(name = "isComplaint", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getIsComplaint() {
		return this.isComplaint;
	}
	
	public void setIsComplaint(java.lang.Integer value) {
		this.isComplaint = value;
	}
	
	@Column(name = "changeType", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
	public java.lang.Integer getChangeType() {
		return this.changeType;
	}
	
	public void setChangeType(java.lang.Integer value) {
		this.changeType = value;
	}
	
	@Column(name = "oldno", unique = false, nullable = true, insertable = true, updatable = true, length = 20)
	public java.lang.String getOldno() {
		return this.oldno;
	}
	
	public void setOldno(java.lang.String value) {
		this.oldno = value;
	}
	
	@Column(name = "oldContent", unique = false, nullable = true, insertable = true, updatable = true, length = 100)
	public java.lang.String getOldContent() {
		return this.oldContent;
	}
	
	public void setOldContent(java.lang.String value) {
		this.oldContent = value;
	}
	
	@Column(name = "describe", unique = false, nullable = true, insertable = true, updatable = true, length = 100)
	public java.lang.String getDescribe() {
		return this.describe;
	}
	
	public void setDescribe(java.lang.String value) {
		this.describe = value;
	}
	
	@Transient
	public String getLandDateString() {
		return DateConvertUtils.format(getLandDate(), FORMAT_LAND_DATE);
	}
	public void setLandDateString(String value) {
		setLandDate(DateConvertUtils.parse(value, FORMAT_LAND_DATE,java.util.Date.class));
	}
	
	@Column(name = "landDate", unique = false, nullable = true, insertable = true, updatable = true, length = 0)
	public java.util.Date getLandDate() {
		return this.landDate;
	}
	
	public void setLandDate(java.util.Date value) {
		this.landDate = value;
	}
	
	@Transient
	public String getCreateDateString() {
		return DateConvertUtils.format(getCreateDate(), FORMAT_CREATE_DATE);
	}
	public void setCreateDateString(String value) {
		setCreateDate(DateConvertUtils.parse(value, FORMAT_CREATE_DATE,java.util.Date.class));
	}
	
	@Column(name = "createDate", unique = false, nullable = true, insertable = true, updatable = true, length = 0)
	public java.util.Date getCreateDate() {
		return this.createDate;
	}
	
	public void setCreateDate(java.util.Date value) {
		this.createDate = value;
	}
	

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Objid",getObjid())
			.append("Sno",getSno())
			.append("Landno",getLandno())
			.append("CorpName",getCorpName())
			.append("Address",getAddress())
			.append("LandOwner",getLandOwner())
			.append("Business",getBusiness())
			.append("Live",getLive())
			.append("Industry",getIndustry())
			.append("Composite",getComposite())
			.append("RemainingTerm",getRemainingTerm())
			.append("Area",getArea())
			.append("IsComplaint",getIsComplaint())
			.append("ChangeType",getChangeType())
			.append("Oldno",getOldno())
			.append("OldContent",getOldContent())
			.append("Describe",getDescribe())
			.append("LandDate",getLandDate())
			.append("CreateDate",getCreateDate())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getObjid())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Collective == false) return false;
		if(this == obj) return true;
		Collective other = (Collective)obj;
		return new EqualsBuilder()
			.append(getObjid(),other.getObjid())
			.isEquals();
	}
}

